import Axios from 'axios'

const axios = Axios.create({
  // 配置基地址
  baseURL: 'http://liufusong.top:8080',
  // 配置超时时间
  timeout: 20000
})

export default ({ url, method = 'GET', params, data, headers }) => {
  return axios({
    url: url,
    method: method,
    params: params,
    data: data,
    headers: headers
  })
}
